package com.jalarbee.stock.sales.service.impl;

import com.jalarbee.core.generic.dao.GenericDao;
import com.jalarbee.core.generic.service.impl.GenericServiceImpl;
import com.jalarbee.stock.sales.business.Sale;
import com.jalarbee.stock.sales.dao.SaleDao;
import com.jalarbee.stock.sales.service.SaleService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 *
 * @author Abdoulaye <b>Ikhnaton</b> Diallo
 */
@Service(value="saleService")
public class SaleServiceImpl extends GenericServiceImpl<Sale, Long> implements SaleService {

    public List<Sale> getSales() {
        return ((SaleDao)dao).getSales();
    }

    @Override
    @Autowired
    protected void setDao(@Qualifier(value="saleDao") GenericDao<Sale, Long> dao) {
        this.dao = dao;
    }

}
